/*
 * To owl2 this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xowl.interpreter.frontends.owlxml;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Laurent WOUTERS
 */
public class ExpressionLoader {
    private static final String attrVariable = "variable";
    private static final String attrCardinality = "cardinality";
    private static final String attrNodeID = "nodeID";
    private static final String attrDatatypeIRI = "datatypeIRI";
    private static final String attrValueOf = "valueOf";

    // Utils
    public static List<org.w3c.dom.Node> getElements(org.w3c.dom.Node node) {
        List<org.w3c.dom.Node> list = new ArrayList<org.w3c.dom.Node>();
        for (int i=0; i!=node.getChildNodes().getLength(); i++) {
            org.w3c.dom.Node child = node.getChildNodes().item(i);
            if (child.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE)
                list.add(child);
        }
        return list;
    }


    public static xowl.lang.owl2.Expression load(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Entities
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityClass)) return load_Class(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityDatatype)) return load_Datatype(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityObjectProperty)) return load_ObjectProperty(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityDataProperty)) return load_DataProperty(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityNamedIndividual)) return load_NamedIndividual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.entityFunction)) return load_Function(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expContains)) return load_Contains(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValuesOf)) return load_ValuesOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Class expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectComplementOf)) return load_ObjectComplementOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectIntersectionOf)) return load_ObjectIntersectionOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectOneOf)) return load_ObjectOneOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectUnionOf)) return load_ObjectUnionOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataAllValuesFrom)) return load_DataAllValuesFrom(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataExactCardinality)) return load_DataExactCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataHasValue)) return load_DataHasValue(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMaxCardinality)) return load_DataMaxCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMinCardinality)) return load_DataMinCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataSomeValuesFrom)) return load_DataSomeValuesFrom(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectAllValuesFrom)) return load_ObjectAllValuesFrom(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectExactCardinality)) return load_ObjectExactCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasSelf)) return load_ObjectHasSelf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasValue)) return load_ObjectHasValue(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMaxCardinality)) return load_ObjectMaxCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMinCardinality)) return load_ObjectMinCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectSomeValuesFrom)) return load_ObjectSomeValuesFrom(ontologyLoader, node, context);
        // Datatype expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataComplementOf)) return load_DataComplementOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataIntersectionOf)) return load_DataIntersectionOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataOneOf)) return load_DataOneOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDatatypeRestriction)) return load_DatatypeRestriction(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataUnionOf)) return load_DataUnionOf(ontologyLoader, node, context);
        // Individual expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityAnonymousIndividual)) return load_AnonymousIndividual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewIndividual)) return load_NewIndividual(ontologyLoader, node, context);
        // Literal expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expLiteral)) return load_Literal(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expPlus)) return load_Plus(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMinus)) return load_Minus(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMult)) return load_Mult(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDivide)) return load_Divide(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expModulus)) return load_Modulus(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expAnd)) return load_BAnd(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expOr)) return load_BOr(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expXOr)) return load_BXOr(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expNot)) return load_BNot(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEqual)) return load_Equal(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDifferent)) return load_Different(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreater)) return load_Greater(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreaterEqual)) return load_GreaterEqual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesser)) return load_Lesser(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesserEqual)) return load_LesserEqual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expIRIOf)) return load_IRIOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLengthOf)) return load_LengthOf(ontologyLoader, node, context);
        // Object Property expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectInverseOf)) return load_ObjectInverseOf(ontologyLoader, node, context);
        // Executable expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expLambda)) return load_Lambda(ontologyLoader, node, context);
        // Array expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expArray)) return load_Array(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expConcat)) return load_Concat(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expSlice)) return load_Slice(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expNewObject)) return load_NewObject(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.EntityExpression loadEntityExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Entities
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityClass)) return load_Class(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityDatatype)) return load_Datatype(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityObjectProperty)) return load_ObjectProperty(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityDataProperty)) return load_DataProperty(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityNamedIndividual)) return load_NamedIndividual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.entityFunction)) return load_Function(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.ClassExpression loadClassExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Entities
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityClass)) return load_Class(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Class expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectComplementOf)) return load_ObjectComplementOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectIntersectionOf)) return load_ObjectIntersectionOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectOneOf)) return load_ObjectOneOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectUnionOf)) return load_ObjectUnionOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataAllValuesFrom)) return load_DataAllValuesFrom(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataExactCardinality)) return load_DataExactCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataHasValue)) return load_DataHasValue(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMaxCardinality)) return load_DataMaxCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMinCardinality)) return load_DataMinCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataSomeValuesFrom)) return load_DataSomeValuesFrom(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectAllValuesFrom)) return load_ObjectAllValuesFrom(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectExactCardinality)) return load_ObjectExactCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasSelf)) return load_ObjectHasSelf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasValue)) return load_ObjectHasValue(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMaxCardinality)) return load_ObjectMaxCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMinCardinality)) return load_ObjectMinCardinality(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectSomeValuesFrom)) return load_ObjectSomeValuesFrom(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.Datarange loadDatarangeExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityDatatype)) return load_Datatype(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Datatype expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataComplementOf)) return load_DataComplementOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataIntersectionOf)) return load_DataIntersectionOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataOneOf)) return load_DataOneOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDatatypeRestriction)) return load_DatatypeRestriction(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataUnionOf)) return load_DataUnionOf(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.IndividualExpression loadIndividualExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityNamedIndividual)) return load_NamedIndividual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityAnonymousIndividual)) return load_AnonymousIndividual(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Individual expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewIndividual)) return load_NewIndividual(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.LiteralExpression loadLiteralExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expContains)) return load_Contains(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Literal expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expLiteral)) return load_Literal(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expPlus)) return load_Plus(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMinus)) return load_Minus(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMult)) return load_Mult(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDivide)) return load_Divide(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expModulus)) return load_Modulus(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expAnd)) return load_BAnd(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expOr)) return load_BOr(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expXOr)) return load_BXOr(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expNot)) return load_BNot(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEqual)) return load_Equal(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDifferent)) return load_Different(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreater)) return load_Greater(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreaterEqual)) return load_GreaterEqual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesser)) return load_Lesser(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesserEqual)) return load_LesserEqual(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expIRIOf)) return load_IRIOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLengthOf)) return load_LengthOf(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.DataPropertyExpression loadDataPropExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityDataProperty)) return load_DataProperty(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.owl2.ObjectPropertyExpression loadObjPropExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        if (name.equals(xowl.interpreter.frontends.VocOWL2.entityObjectProperty)) return load_ObjectProperty(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Object Property expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectInverseOf)) return load_ObjectInverseOf(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.actions.FunctionExpression loadFunctionExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        if (name.equals(xowl.interpreter.frontends.VocActions.entityFunction)) return load_Function(ontologyLoader, node, context);
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.actions.ExecutableExpression loadExecutableExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Executable expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expLambda)) return load_Lambda(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.actions.ArrayExpression loadArrayExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValuesOf)) return load_ValuesOf(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Array expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expArray)) return load_Array(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expConcat)) return load_Concat(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expSlice)) return load_Slice(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }
    public static xowl.lang.interop.JavaObjectExpression loadJavaObjectExp(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        String name = node.getNodeName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return load_CodeVariable(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(ontologyLoader, node, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expNewObject)) return load_NewObject(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(ontologyLoader, node, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(ontologyLoader, node, context);
        return null;
    }



    // Multiple classification
    public static xowl.lang.actions.Invoke load_Invoke(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Invoke expression = new xowl.lang.actions.Invoke();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setFunction(loadFunctionExp(ontologyLoader, children.get(0), context));
        if (children.size() == 1)
            return expression;
        if (isToSeqNode(children.get(1))) {
            expression.setValueSeq(load_ToSeq(ontologyLoader, children.get(1), context));
        } else {
            List<xowl.lang.owl2.Expression> exps = new ArrayList<xowl.lang.owl2.Expression>();
            for (int i=1; i!=children.size(); i++) {
                xowl.lang.owl2.Expression temp = load(ontologyLoader, children.get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setValueSeq(xowl.interpreter.impl.Sequences.toSequence_Exp(exps));
        }
        return expression;
    }
    public static xowl.lang.actions.Execute load_Execute(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Execute expression = new xowl.lang.actions.Execute();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setExecutes(loadExecutableExp(ontologyLoader, children.get(0), context));
        if (children.size() == 1)
            return expression;
        if (isToSeqNode(children.get(1))) {
            expression.setValueSeq(load_ToSeq(ontologyLoader, children.get(1), context));
        } else {
            List<xowl.lang.owl2.Expression> exps = new ArrayList<xowl.lang.owl2.Expression>();
            for (int i=1; i!=children.size(); i++) {
                xowl.lang.owl2.Expression temp = load(ontologyLoader, children.get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setValueSeq(xowl.interpreter.impl.Sequences.toSequence_Exp(exps));
        }
        return expression;
    }
    private static xowl.lang.actions.Contains load_Contains(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Contains expression = new xowl.lang.actions.Contains();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        List<org.w3c.dom.Node> children = getElements(node);
        for (org.w3c.dom.Node child : children)
            expression.addAxioms(AxiomLoader.load(ontologyLoader, child, innerContext));
        return expression;
    }
    private static xowl.lang.actions.ValuesOf load_ValuesOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.ValuesOf expression = new xowl.lang.actions.ValuesOf();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        org.w3c.dom.Node valueOf = node.getAttributes().getNamedItem(attrValueOf);
        if (valueOf != null) expression.setOn(innerContext.resolveQuery(valueOf.getNodeValue()));
        List<org.w3c.dom.Node> children = getElements(node);
        for (org.w3c.dom.Node child : children) {
            xowl.lang.owl2.LiteralExpression exp = ExpressionLoader.loadLiteralExp(ontologyLoader, child, innerContext);
            if (exp != null)
                expression.addGuards(exp);
            else
                expression.addAxioms(AxiomLoader.load(ontologyLoader, child, innerContext));
        }
        return expression;
    }
    private static xowl.lang.actions.ValueOf load_ValueOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.ValueOf expression = new xowl.lang.actions.ValueOf();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        org.w3c.dom.Node valueOf = node.getAttributes().getNamedItem(attrValueOf);
        if (valueOf != null) expression.setOn(innerContext.resolveQuery(valueOf.getNodeValue()));
        List<org.w3c.dom.Node> children = getElements(node);
        for (org.w3c.dom.Node child : children) {
            xowl.lang.owl2.LiteralExpression exp = ExpressionLoader.loadLiteralExp(ontologyLoader, child, innerContext);
            if (exp != null)
                expression.addGuards(exp);
            else
                expression.addAxioms(AxiomLoader.load(ontologyLoader, child, innerContext));
        }
        return expression;
    }
    private static xowl.lang.actions.CodeVariable load_CodeVariable(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return context.resolveCode(node.getAttributes().getNamedItem(attrVariable).getNodeValue());
    }
    private static xowl.lang.actions.QueryVariable load_QueryVariable(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return context.resolveQuery(node.getAttributes().getNamedItem(attrVariable).getNodeValue());
    }
    private static xowl.lang.actions.ArrayElement load_ArrayElement(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.ArrayElement expression = new xowl.lang.actions.ArrayElement();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setArray(loadArrayExp(ontologyLoader, children.get(0), context));
        expression.setIndex(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }



    // Entity expressions
    private static xowl.lang.owl2.EntityExpression load_NewEntity(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.NewEntity expression = new xowl.lang.actions.NewEntity();
        for (int i=0; i!=node.getChildNodes().getLength(); i++) {
            org.w3c.dom.Node child = node.getChildNodes().item(i);
            if (child.getNodeType() != org.w3c.dom.Node.ELEMENT_NODE)
                continue;
            if (expression.getIri() == null)
                expression.setIri(loadLiteralExp(ontologyLoader, child, context));
        }
        return expression;
    }
    private static xowl.lang.owl2.EntityExpression load_EntityForIRI(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.EntityForIRI expression = new xowl.lang.actions.EntityForIRI();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setIri(loadLiteralExp(ontologyLoader, children.get(0), context));
        return expression;
    }



    // Class expressions
    private static xowl.lang.owl2.EntityExpression load_Class(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.getFullIRI(node);
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectComplementOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectComplementOf expression = new xowl.lang.owl2.ObjectComplementOf();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setClasse(loadClassExp(ontologyLoader, children.get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectIntersectionOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectIntersectionOf expression = new xowl.lang.owl2.ObjectIntersectionOf();
        List<org.w3c.dom.Node> children = getElements(node);
        if (children.isEmpty())
            return expression;
        if (isToSeqNode(children.get(0))) {
            expression.setClassSeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.ClassExpression> exps = new ArrayList<xowl.lang.owl2.ClassExpression>();
            for (org.w3c.dom.Node child : children) {
                xowl.lang.owl2.ClassExpression temp = loadClassExp(ontologyLoader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setClassSeq(xowl.interpreter.impl.Sequences.toSequence_Class(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectOneOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectOneOf expression = new xowl.lang.owl2.ObjectOneOf();
        List<org.w3c.dom.Node> children = getElements(node);
        if (children.isEmpty())
            return expression;
        if (isToSeqNode(children.get(0))) {
            expression.setIndividualSeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.IndividualExpression> exps = new ArrayList<xowl.lang.owl2.IndividualExpression>();
            for (org.w3c.dom.Node child : children) {
                xowl.lang.owl2.IndividualExpression temp = loadIndividualExp(ontologyLoader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setIndividualSeq(xowl.interpreter.impl.Sequences.toSequence_Ind(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectUnionOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectUnionOf expression = new xowl.lang.owl2.ObjectUnionOf();
        List<org.w3c.dom.Node> children = getElements(node);
        if (children.isEmpty())
            return expression;
        if (isToSeqNode(children.get(0))) {
            expression.setClassSeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.ClassExpression> exps = new ArrayList<xowl.lang.owl2.ClassExpression>();
            for (org.w3c.dom.Node child : children) {
                xowl.lang.owl2.ClassExpression temp = loadClassExp(ontologyLoader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setClassSeq(xowl.interpreter.impl.Sequences.toSequence_Class(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataAllValuesFrom(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataAllValuesFrom expression = new xowl.lang.owl2.DataAllValuesFrom();
        List<org.w3c.dom.Node> children = getElements(node);
        if (isToSeqNode(children.get(0))) {
            expression.setDataPropertySeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.DataPropertyExpression> exps = new ArrayList<xowl.lang.owl2.DataPropertyExpression>();
            for (int i=0; i!=children.size()-1; i++) {
                xowl.lang.owl2.DataPropertyExpression temp = ExpressionLoader.loadDataPropExp(ontologyLoader, children.get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setDataPropertySeq(xowl.interpreter.impl.Sequences.toSequence_DataProp(exps));
        }
        expression.setDatarange(loadDatarangeExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataExactCardinality(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataExactCardinality expression = new xowl.lang.owl2.DataExactCardinality();
        xowl.lang.owl2.Literal cardinality = new xowl.lang.owl2.Literal();
        cardinality.setLexicalValue(node.getAttributes().getNamedItem(attrCardinality).getNodeValue());
        cardinality.setMemberOf(ontologyLoader.getFullIRI(xowl.interpreter.impl.OWLDatatype.xsdInteger));
        expression.setCardinality(cardinality);
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setDataProperty(loadDataPropExp(ontologyLoader, children.get(0), context));
        if (children.size() > 1)
            expression.setDatarange(loadDatarangeExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataHasValue(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataHasValue expression = new xowl.lang.owl2.DataHasValue();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setDataProperty(loadDataPropExp(ontologyLoader, children.get(0), context));
        expression.setLiteral(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataMaxCardinality(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataMaxCardinality expression = new xowl.lang.owl2.DataMaxCardinality();
        xowl.lang.owl2.Literal cardinality = new xowl.lang.owl2.Literal();
        cardinality.setLexicalValue(node.getAttributes().getNamedItem(attrCardinality).getNodeValue());
        cardinality.setMemberOf(ontologyLoader.getFullIRI(xowl.interpreter.impl.OWLDatatype.xsdInteger));
        expression.setCardinality(cardinality);
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setDataProperty(loadDataPropExp(ontologyLoader, children.get(0), context));
        if (children.size() > 1)
            expression.setDatarange(loadDatarangeExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataMinCardinality(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataMinCardinality expression = new xowl.lang.owl2.DataMinCardinality();
        xowl.lang.owl2.Literal cardinality = new xowl.lang.owl2.Literal();
        cardinality.setLexicalValue(node.getAttributes().getNamedItem(attrCardinality).getNodeValue());
        cardinality.setMemberOf(ontologyLoader.getFullIRI(xowl.interpreter.impl.OWLDatatype.xsdInteger));
        expression.setCardinality(cardinality);
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setDataProperty(loadDataPropExp(ontologyLoader, children.get(0), context));
        if (children.size() > 1)
            expression.setDatarange(loadDatarangeExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataSomeValuesFrom(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataSomeValuesFrom expression = new xowl.lang.owl2.DataSomeValuesFrom();
        List<org.w3c.dom.Node> children = getElements(node);
        if (isToSeqNode(children.get(0))) {
            expression.setDataPropertySeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.DataPropertyExpression> exps = new ArrayList<xowl.lang.owl2.DataPropertyExpression>();
            for (int i=0; i!=children.size()-1; i++) {
                xowl.lang.owl2.DataPropertyExpression temp = ExpressionLoader.loadDataPropExp(ontologyLoader, children.get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setDataPropertySeq(xowl.interpreter.impl.Sequences.toSequence_DataProp(exps));
        }
        expression.setDatarange(loadDatarangeExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectAllValuesFrom(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectAllValuesFrom expression = new xowl.lang.owl2.ObjectAllValuesFrom();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        expression.setClasse(loadClassExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectExactCardinality(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectExactCardinality expression = new xowl.lang.owl2.ObjectExactCardinality();
        xowl.lang.owl2.Literal cardinality = new xowl.lang.owl2.Literal();
        cardinality.setLexicalValue(node.getAttributes().getNamedItem(attrCardinality).getNodeValue());
        cardinality.setMemberOf(ontologyLoader.getFullIRI(xowl.interpreter.impl.OWLDatatype.xsdInteger));
        expression.setCardinality(cardinality);
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        if (children.size() > 1)
            expression.setClasse(loadClassExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectHasSelf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectHasSelf expression = new xowl.lang.owl2.ObjectHasSelf();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectHasValue(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectHasValue expression = new xowl.lang.owl2.ObjectHasValue();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        expression.setIndividual(loadIndividualExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectMaxCardinality(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectMaxCardinality expression = new xowl.lang.owl2.ObjectMaxCardinality();
        xowl.lang.owl2.Literal cardinality = new xowl.lang.owl2.Literal();
        cardinality.setLexicalValue(node.getAttributes().getNamedItem(attrCardinality).getNodeValue());
        cardinality.setMemberOf(ontologyLoader.getFullIRI(xowl.interpreter.impl.OWLDatatype.xsdInteger));
        expression.setCardinality(cardinality);
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        if (children.size() > 1)
            expression.setClasse(loadClassExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectMinCardinality(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectMinCardinality expression = new xowl.lang.owl2.ObjectMinCardinality();
        xowl.lang.owl2.Literal cardinality = new xowl.lang.owl2.Literal();
        cardinality.setLexicalValue(node.getAttributes().getNamedItem(attrCardinality).getNodeValue());
        cardinality.setMemberOf(ontologyLoader.getFullIRI(xowl.interpreter.impl.OWLDatatype.xsdInteger));
        expression.setCardinality(cardinality);
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        if (children.size() > 1)
            expression.setClasse(loadClassExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectSomeValuesFrom(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectSomeValuesFrom expression = new xowl.lang.owl2.ObjectSomeValuesFrom();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setObjectProperty(loadObjPropExp(ontologyLoader, children.get(0), context));
        expression.setClasse(loadClassExp(ontologyLoader, children.get(1), context));
        return expression;
    }



    // Datatype expressions
    private static xowl.lang.owl2.EntityExpression load_Datatype(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.getFullIRI(node);
    }
    private static xowl.lang.owl2.Datarange load_DataComplementOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataComplementOf expression = new xowl.lang.owl2.DataComplementOf();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setDatarange(loadDatarangeExp(ontologyLoader, children.get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DataIntersectionOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataIntersectionOf expression = new xowl.lang.owl2.DataIntersectionOf();
        List<org.w3c.dom.Node> children = getElements(node);
        if (children.isEmpty())
            return expression;
        if (isToSeqNode(children.get(0))) {
            expression.setDatarangeSeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.Datarange> exps = new ArrayList<xowl.lang.owl2.Datarange>();
            for (org.w3c.dom.Node child : children) {
                xowl.lang.owl2.Datarange temp = loadDatarangeExp(ontologyLoader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setDatarangeSeq(xowl.interpreter.impl.Sequences.toSequence_Datatype(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DataOneOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataOneOf expression = new xowl.lang.owl2.DataOneOf();
        List<org.w3c.dom.Node> children = getElements(node);
        if (children.isEmpty())
            return expression;
        if (isToSeqNode(children.get(0))) {
            expression.setLiteralSeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.LiteralExpression> exps = new ArrayList<xowl.lang.owl2.LiteralExpression>();
            for (org.w3c.dom.Node child : children) {
                 xowl.lang.owl2.LiteralExpression temp = loadLiteralExp(ontologyLoader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setLiteralSeq(xowl.interpreter.impl.Sequences.toSequence_Lit(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DatatypeRestriction(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DatatypeRestriction expression = new xowl.lang.owl2.DatatypeRestriction();
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DataUnionOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.DataUnionOf expression = new xowl.lang.owl2.DataUnionOf();
        List<org.w3c.dom.Node> children = getElements(node);
        if (children.isEmpty())
            return expression;
        if (isToSeqNode(children.get(0))) {
            expression.setDatarangeSeq(load_ToSeq(ontologyLoader, children.get(0), context));
        } else {
            List<xowl.lang.owl2.Datarange> exps = new ArrayList<xowl.lang.owl2.Datarange>();
            for (org.w3c.dom.Node child : children) {
                xowl.lang.owl2.Datarange temp = loadDatarangeExp(ontologyLoader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setDatarangeSeq(xowl.interpreter.impl.Sequences.toSequence_Datatype(exps));
        }
        return expression;
    }



    // Individual expression
    private static xowl.lang.owl2.EntityExpression load_NamedIndividual(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.getFullIRI(node);
    }
    public static xowl.lang.owl2.AnonymousIndividual load_AnonymousIndividual(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.resolveAnonymousIndividual(node.getAttributes().getNamedItem(attrNodeID).getNodeValue());
    }
    private static xowl.lang.owl2.IndividualExpression load_NewIndividual(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.NewIndividual expression = new xowl.lang.actions.NewIndividual();
        return expression;
    }



    // Literal expressions
    public static xowl.lang.owl2.Literal load_Literal(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.Literal expression = new xowl.lang.owl2.Literal();
        expression.setLexicalValue(node.getTextContent());
        String datatype = node.getAttributes().getNamedItem(attrDatatypeIRI).getNodeValue();
        expression.setMemberOf(ontologyLoader.getFullIRI(datatype));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Plus(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Plus expression = new xowl.lang.actions.Plus();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Minus(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Minus expression = new xowl.lang.actions.Minus();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Mult(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Mult expression = new xowl.lang.actions.Mult();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Divide(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Divide expression = new xowl.lang.actions.Divide();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Modulus(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Modulus expression = new xowl.lang.actions.Modulus();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BAnd(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.BAnd expression = new xowl.lang.actions.BAnd();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BOr(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.BOr expression = new xowl.lang.actions.BOr();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BXOr(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.BXOr expression = new xowl.lang.actions.BXOr();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BNot(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.BNot expression = new xowl.lang.actions.BNot();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setExpression(loadLiteralExp(ontologyLoader, children.get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Equal(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Equal expression = new xowl.lang.actions.Equal();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(load(ontologyLoader, children.get(0), context));
        expression.setRhs(load(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Different(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Different expression = new xowl.lang.actions.Different();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(load(ontologyLoader, children.get(0), context));
        expression.setRhs(load(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Greater(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Greater expression = new xowl.lang.actions.Greater();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_GreaterEqual(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.GreaterEqual expression = new xowl.lang.actions.GreaterEqual();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Lesser(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Lesser expression = new xowl.lang.actions.Lesser();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_LesserEqual(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.LesserEqual expression = new xowl.lang.actions.LesserEqual();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setLhs(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setRhs(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_IRIOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.IRIOf expression = new xowl.lang.actions.IRIOf();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setEntity(loadEntityExp(ontologyLoader, children.get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_LengthOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.LengthOf expression = new xowl.lang.actions.LengthOf();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setArray(loadArrayExp(ontologyLoader, children.get(0), context));
        return expression;
    }



    // Data Property expressions
    private static xowl.lang.owl2.EntityExpression load_DataProperty(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.getFullIRI(node);
    }



    // Object Property expressions
    private static xowl.lang.owl2.EntityExpression load_ObjectProperty(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.getFullIRI(node);
    }
    private static xowl.lang.owl2.ObjectPropertyExpression load_ObjectInverseOf(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.owl2.ObjectInverseOf expression = new xowl.lang.owl2.ObjectInverseOf();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setInverse(loadObjPropExp(ontologyLoader, children.get(0), context));
        return expression;
    }



    // Function expressions
    private static xowl.lang.owl2.EntityExpression load_Function(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        return ontologyLoader.getFullIRI(node);
    }



    // Executable expressions
    private static xowl.lang.actions.ExecutableExpression load_Lambda(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Lambda expression = new xowl.lang.actions.Lambda();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        if (context != null) {
            for (xowl.lang.actions.CodeVariable free : context.getCodeVariables())
                expression.addFreeVars(free);
        }
        List<org.w3c.dom.Node> children = getElements(node);
        for (org.w3c.dom.Node child : children) {
            xowl.lang.actions.CodeVariable var = VariableLoader.load(child, innerContext);
            if (var != null)
                expression.addBoundVars(var);
            else
                expression.setContains(StatementLoader.load(ontologyLoader, child, innerContext));
        }
        return expression;
    }

    

    // Array expressions
    private static xowl.lang.actions.ArrayExpression load_Array(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Array expression = new xowl.lang.actions.Array();
        List<org.w3c.dom.Node> children = getElements(node);
        int index = 0;
        for (org.w3c.dom.Node child : children) {
            xowl.lang.owl2.Expression exp = load(ontologyLoader, child, context);
            if (exp != null) {
                xowl.lang.actions.Element elem = new xowl.lang.actions.Element();
                elem.setElemIndex(index);
                elem.setElemValue(exp);
                expression.addElements(elem);
                index++;
            }
        }
        return expression;
    }
    private static xowl.lang.actions.ArrayExpression load_Concat(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Concat expression = new xowl.lang.actions.Concat();
        List<org.w3c.dom.Node> children = getElements(node);
        int index = 0;
        for (org.w3c.dom.Node child : children) {
            xowl.lang.owl2.Expression exp = load(ontologyLoader, child, context);
            if (exp != null) {
                xowl.lang.actions.Element elem = new xowl.lang.actions.Element();
                elem.setElemIndex(index);
                elem.setElemValue(exp);
                expression.addElements(elem);
                index++;
            }
        }
        return expression;
    }
    private static xowl.lang.actions.ArrayExpression load_Slice(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.Slice expression = new xowl.lang.actions.Slice();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setArray(loadArrayExp(ontologyLoader, children.get(0), context));
        expression.setLowerBound(loadLiteralExp(ontologyLoader, children.get(1), context));
        expression.setUpperBound(loadLiteralExp(ontologyLoader, children.get(2), context));
        return expression;
    }


    // Java Interop expressions
    public static xowl.lang.interop.JavaInvokation load_JavaInvokation(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.interop.JavaInvokation expression = new xowl.lang.interop.JavaInvokation();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setOn(loadJavaObjectExp(ontologyLoader, children.get(0), context));
        expression.setMethod(loadLiteralExp(ontologyLoader, children.get(1), context));
        for (int i=2; i!=children.size(); i++)
            expression.addParams(load(ontologyLoader, children.get(i), context));
        return expression;
    }
    private static xowl.lang.interop.NewObject load_NewObject(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.interop.NewObject expression = new xowl.lang.interop.NewObject();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setClasse(loadLiteralExp(ontologyLoader, children.get(0), context));
        for (int i=1; i!=children.size(); i++)
            expression.addParams(loadJavaObjectExp(ontologyLoader, children.get(i), context));
        return expression;
    }
    private static xowl.lang.interop.ObjectField load_ObjectField(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.interop.ObjectField expression = new xowl.lang.interop.ObjectField();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setOn(loadJavaObjectExp(ontologyLoader, children.get(0), context));
        expression.setField(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }
    private static xowl.lang.interop.StaticField load_StaticField(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.interop.StaticField expression = new xowl.lang.interop.StaticField();
        List<org.w3c.dom.Node> children = getElements(node);
        expression.setClasse(loadLiteralExp(ontologyLoader, children.get(0), context));
        expression.setField(loadLiteralExp(ontologyLoader, children.get(1), context));
        return expression;
    }


    // Sequences
    public static xowl.lang.actions.ToSeq load_ToSeq(OntologyLoader ontologyLoader, org.w3c.dom.Node node, xowl.interpreter.frontends.LexicalContext context) {
        xowl.lang.actions.ToSeq toseq = new xowl.lang.actions.ToSeq();
        List<org.w3c.dom.Node> children = getElements(node);
        toseq.setArray(loadArrayExp(ontologyLoader, children.get(0), context));
        return toseq;
    }
    public static boolean isToSeqNode(org.w3c.dom.Node node) {
        return node.getNodeName().equals(xowl.interpreter.frontends.VocActions.seqToSeq);
    }

}
